package com.yonyou.iuap.jxzy.entity;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yonyou.iuap.baseservice.bpm.entity.AbsBpmModel;
import com.yonyou.iuap.baseservice.print.entity.Printable;      
import com.yonyou.iuap.baseservice.datapermission.annotation.DataAccess;
import com.yonyou.iuap.baseservice.entity.annotation.Reference;
import com.yonyou.iuap.baseservice.support.condition.Condition;
import com.yonyou.iuap.baseservice.support.condition.Match;
import com.yonyou.iuap.baseservice.support.generator.GeneratedValue;
import com.yonyou.iuap.baseservice.support.generator.Strategy;
import com.yonyou.iuap.baseservice.entity.annotation.CodingEntity;
import com.yonyou.iuap.baseservice.entity.annotation.CodingField;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;


import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Random;
import java.math.BigDecimal;

/**
 * 监控抽样  关联磅单表和子表
 * @date 2019年05月13日 下午03点51分05秒
 */

@JsonIgnoreProperties(ignoreUnknown = true)
@Table(name = "levm_poundbill")//  jx_monitorSample

@CodingEntity(codingField="")
public class MonitorSample extends AbsBpmModel  implements Serializable,Printable
{
    /*@Id
    @GeneratedValue
    @Condition*/
    protected String id;//ID
    @Override
    public String getId() {
        return id;
    }
    @Override
    public void setId(Serializable id){
        this.id= id.toString();
        super.id = id;
    }
    public void setId(String id) {
        this.id = id;
    }
    
        @Override
        public String getMainBoCode() {
                return "levm_poundbill";
        }


    /*@Condition
    @Column(name="pk_monitorSample")
    private String pk_monitorSample;        //主键  pk_monitorSample
*/    
    @Id
    @GeneratedValue
    @Condition
    private String pk_poundbill;//子表关联主表的id,主表的id

    /*public void setPk_monitorSample(String pk_monitorSample){
        this.pk_monitorSample = pk_monitorSample;
    }
    public String getPk_monitorSample(){
        return this.pk_monitorSample;
    }*/
    
    @Condition
    @Column(name="pk_org")
    private String pk_purchasing;//采购组织  
    
    //TODO
    @Condition
    @Column(name="code")
    private String purchasing_code;//采购组织编码 org_orgs
    
    @Condition
    @Column(name="planNo")
    private String planNo;//计划单号
    
    @Condition
    @Column(name="vbdef9")
    private String auditStatus;//审核状态    子表
    
    @Condition
    @Column(name="vbdef6")
    private String samplingArea;//抽样区  子表 --vdef6
    
    @Condition
    @Column(name="materialVariety")
    private String materialVariety;//物料品种   视图的  
    
    @Condition
    @Column(name="pk_material")
    private String pk_material;//物料pk  物料主键：BD_MATERIAL
    
    @Condition
    @Column(name="code")
    private String material_code;//物料编码 
    
    @Condition
    @Column(name="name")
    private String name;//物料名称
    
    @Condition
    @Column(name="columNo")
    private String columnNo;//列数
    
    @Condition
    @Column(name="rowNo")
    private String rowNo;//排数
    
    @Condition
    @Column(name="layerNo")
    private String layerNo;//层数
    
    @Condition
    @Column(name="vdef3")
    private String totalPackageNo;//总包数  vdef3 主表
    
    @Condition
    @Column(name="vdef6")
    private String samplingLocation;//抽样位置  vdef6 主表
    
    @Condition
    @Column(name="vdef4")
    private String sampleArray;//前端加抽样本 vdef4主表
    
    
    private String[] pumpingPosition;//加抽位置
    
    @Condition
    @Column(name="imgUrl")
    private String imgUrl;//抽样区照片
    
    @Condition
    @Column(name="vbdef7")
    private String isAddPumping;//是否已推送LED数据   vdef7 磅单子表
    
    //抽样位置有值才可以做查
    //磅单子表  抽样区  vdef6
    
    
    @Condition
    @Column(name="name")
    private String purchasOrg;
    
    @Condition
    @Column(name="vdef5")
    private String vdef5;//收货通知单的列，排，层数  3排5列3层
    
    @Condition
    @Column(name="pk_delivery")
    private String pk_delivery;//收货通知单主键
    
    /**
     * 查询条件
     */
    private String vvehicle;//车牌号 
    private String  vbillcode;//磅单号
    private String serialNo;//序列号
    private String caseNo;//箱号
    private String meterPoint;//计量点
    
    
    private String[] sampleAreaPhoto;//监控图片  页面展示
    private String path;	// 监控图片路径
    
    private String humanVerifyFlag ;//是否人工检测 true false
    
    
    
	public String getHumanVerifyFlag() {
		return humanVerifyFlag;
	}
	public void setHumanVerifyFlag(String humanVerifyFlag) {
		this.humanVerifyFlag = humanVerifyFlag;
	}
	public String getPath() {
		return path;
	}
	public String[] getSampleAreaPhoto() {
		return sampleAreaPhoto;
	}
	public void setSampleAreaPhoto(String[] sampleAreaPhoto) {
		this.sampleAreaPhoto = sampleAreaPhoto;
	}
	public void setPath(String path) {
		this.path = path;
	}
		
		public String getVvehicle() {
		return vvehicle;
	}
	public void setVvehicle(String vvehicle) {
		this.vvehicle = vvehicle;
	}
	public String getVbillcode() {
		return vbillcode;
	}
	public void setVbillcode(String vbillcode) {
		this.vbillcode = vbillcode;
	}
	public String getSerialNo() {
		return serialNo;
	}
	public void setSerialNo(String serialNo) {
		this.serialNo = serialNo;
	}
	public String getCaseNo() {
		return caseNo;
	}
	public void setCaseNo(String caseNo) {
		this.caseNo = caseNo;
	}
	public String getMeterPoint() {
		return meterPoint;
	}
	public void setMeterPoint(String meterPoint) {
		this.meterPoint = meterPoint;
	}
		public String getPk_delivery() {
		return pk_delivery;
	}
	public void setPk_delivery(String pk_delivery) {
		this.pk_delivery = pk_delivery;
	}
		public String getVdef5() {
		return vdef5;
	}
	public void setVdef5(String vdef5) {
		this.vdef5 = vdef5;
	}
		public String getPurchasOrg() {
		return purchasOrg;
	}
	public void setPurchasOrg(String purchasOrg) {
		this.purchasOrg = purchasOrg;
	}
		@Override
        public String getBpmBillCode() {
        return  DateUtil.format(new Date(), "yyyyMMddHHmmss"+new Random().nextInt(10))   ;
        }
		public String getPk_poundbill() {
			return pk_poundbill;
		}
		public void setPk_poundbill(String pk_poundbill) {
			this.pk_poundbill = pk_poundbill;
		}
		public String getPk_purchasing() {
			return pk_purchasing;
		}
		public void setPk_purchasing(String pk_purchasing) {
			this.pk_purchasing = pk_purchasing;
		}
		public String getPurchasing_code() {
			return purchasing_code;
		}
		public void setPurchasing_code(String purchasing_code) {
			this.purchasing_code = purchasing_code;
		}
		public String getPlanNo() {
			return planNo;
		}
		public void setPlanNo(String planNo) {
			this.planNo = planNo;
		}
		public String getAuditStatus() {
			return auditStatus;
		}
		public void setAuditStatus(String auditStatus) {
			this.auditStatus = auditStatus;
		}
		public String getSamplingArea() {
			return samplingArea;
		}
		public void setSamplingArea(String samplingArea) {
			this.samplingArea = samplingArea;
		}
		public String getMaterialVariety() {
			return materialVariety;
		}
		public void setMaterialVariety(String materialVariety) {
			this.materialVariety = materialVariety;
		}
		public String getPk_material() {
			return pk_material;
		}
		public void setPk_material(String pk_material) {
			this.pk_material = pk_material;
		}
		public String getMaterial_code() {
			return material_code;
		}
		public void setMaterial_code(String material_code) {
			this.material_code = material_code;
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public String getColumnNo() {
			return columnNo;
		}
		public void setColumnNo(String columnNo) {
			this.columnNo = columnNo;
		}
		public String getRowNo() {
			return rowNo;
		}
		public void setRowNo(String rowNo) {
			this.rowNo = rowNo;
		}
		public String getLayerNo() {
			return layerNo;
		}
		public void setLayerNo(String layerNo) {
			this.layerNo = layerNo;
		}
		public String getTotalPackageNo() {
			return totalPackageNo;
		}
		public void setTotalPackageNo(String totalPackageNo) {
			this.totalPackageNo = totalPackageNo;
		}
		public String getSamplingLocation() {
			return samplingLocation;
		}
		public void setSamplingLocation(String samplingLocation) {
			this.samplingLocation = samplingLocation;
		}
		public String getImgUrl() {
			return imgUrl;
		}
		public void setImgUrl(String imgUrl) {
			this.imgUrl = imgUrl;
		}
		public String getIsAddPumping() {
			return isAddPumping;
		}
		public void setIsAddPumping(String isAddPumping) {
			this.isAddPumping = isAddPumping;
		}
		public String getSampleArray() {
			return sampleArray;
		}
		public void setSampleArray(String sampleArray) {
			this.sampleArray = sampleArray;
		}
		public String[] getPumpingPosition() {
			return pumpingPosition;
		}
		public void setPumpingPosition(String[] pumpingPosition) {
			this.pumpingPosition = pumpingPosition;
		}
    
}




